<?php
//实例化单例工厂
class factory{
	//生成模型的单例对象
	public static function M($model_name){
		static $model_list = array();

		if(!isset($model_list[$model_name])) {

			$model_list[$model_name] = new $model_name;
		}
			return $model_list[$model_name]; 
	}
}